<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>@yield('title')</title>

    <!-- Styles -->
    <link rel="stylesheet" href="{{ asset('css/app.css') }}">
    <link rel="stylesheet" href="{{ asset('css/layout/layout.css') }}">
    <link rel="stylesheet" href="{{ asset('css/layout/list.css') }}">
    <link rel="stylesheet" href="{{ asset('css/layout/create.css') }}">
    <link rel="stylesheet" href="{{ asset('css/layout/clubInfo.css') }}">
    @yield('css')
</head>
<body>
<nav class="nav-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <i class="fa fa-caret-down fa-lg" aria-hidden="true"></i>
            </button>

            <a class="navbar-brand" href="#">yuejian</a>
        </div>

        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false">俱乐部负责人 <i class="fa fa-caret-down" aria-hidden="true"></i></a>
                    <ul class="dropdown-menu">
                        <li>
                            <a id="logout" href="#">
                                <form action="{{ route('logout') }}" method="POST">
                                    {{ csrf_field() }}
                                    {{ method_field('DELETE') }}
                                    <button class="btn btn-block btn-primary" type="submit" name="button">退出</button>
                                </form>
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>

<div class="row">
    <div class="col-md-2">
        <section>
            <ul id="accordion" class="accordion">


                <li>
                    <div class="link"><i class="fa fa-gitlab" aria-hidden="true"></i>俱乐部管理<i
                                class="fa fa-chevron-down"></i></div>
                    <ul class="submenu">
                        <li>
                            <a href="{{ route('clubLeader') }}">
                                <span>俱乐部信息</span>
                                <span><i class="fa fa-angle-right" aria-hidden="true"></i></span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ route('clubVideo.index') }}">
                                <span>俱乐部视频</span>
                                <span><i class="fa fa-angle-right" aria-hidden="true"></i></span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ route('clubLesson.index') }}">
                                <span>俱乐部课程</span>
                                <span><i class="fa fa-angle-right" aria-hidden="true"></i></span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ route('clubCoach.index') }}">
                                <span>俱乐部教练</span>
                                <span><i class="fa fa-angle-right" aria-hidden="true"></i></span>
                            </a>
                        </li>
                    </ul>
                </li>

            </ul>
        </section>
    </div>
    <div class="col-md-8">
        @include('shared._message')
        @yield('content')
    </div>
</div>

<footer class="footer">
    <span>Copyright © 2017 By yuejian11</span>
</footer>

<script src="/js/app.js"></script>
<script src="/js/jquery.toaster.js"></script>
<script>
    $(document).ready(function () {
        //及时隐藏消息提示
        $('p.alert').not('.alert-important').delay(2000).fadeOut(350);

        var Accordion = function (el, multiple) {
            this.el = el || {};
            this.multiple = multiple || false;

            var links = this.el.find('.link');
            links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown)
        }

        Accordion.prototype.dropdown = function (e) {
            var $el = e.data.el;
            $this = $(this),
                $next = $this.next();

            $next.slideToggle();
            $this.parent().toggleClass('open');

            if (!e.data.multiple) {
                $el.find('.submenu').not($next).slideUp().parent().removeClass('open');
            }
            ;
        }

        var accordion = new Accordion($('#accordion'), false);
    });
</script>
@yield('js')
</body>
</html>
